package com.example.cks_show_text.model;

import com.example.cks_show_text.MyApplication;
import com.example.cks_show_text.xml.CksData;

import java.io.Serializable;

public class CksShow implements Serializable {
    public String titel;
    public String series;
    public String vmodel;
    public String number;

    public String getTitel() {
        return titel;
    }

    public void setTitel(String titel) {
        this.titel = titel;
    }

    public String getSeries() {
        return series;
    }

    public void setSeries(String series) {
        this.series = series;

    }

    public String getVmodel() {
        return vmodel;
    }

    public void setVmodel(String vmodel) {
        this.vmodel = vmodel;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public CksShow(String titel, String series, String vmodel, String number) {
        this.titel = titel;
        this.series = series;
        this.vmodel = vmodel;
        this.number = number;
    }

    public CksShow(String series) {
        CksShow cksShow = CksData.getObject(MyApplication.getMContenx(),series);
        if(cksShow!=null){
            this.titel = cksShow.titel;
            this.series = cksShow.series;
            this.vmodel = cksShow.vmodel;
            this.number = cksShow.number;
        }else {
            this.titel = "0";

            this.series = "0";

            this.vmodel = "0";

            this.number = "0";
        }
    }
}
